CC = g++
LIB = -L../lib
INCLUDE = -I../include

CFLAG = -DLINUX -DLOG_LEVEL_LITE -DDEBUG -g -c
#CFLAG = -DLOG_LEVEL_HEAVY -c
#PROFILE = -pg
PROFILE = 
OPTIMIZE =
WARNNING = -w
LINKLIB = -ltiny -lpthread
TARGET = ../lib/libbase.a
OBJECTS = Tokenizer.o LumpData.o Cycle.o UniqNumGenerater.o Thread.o Socket.o Log.o StringObj.o BitField.o Work.o FileObj.o ShellConnect.o BusyWaiter.o LogService.o TickSaver.o BaseDefine.o NetworkUtil.o Start_End_Time.o IniFile.o StaticProcessInfo.o NumericTime.o 

${TARGET} : ${OBJECTS}
	ar r ${TARGET} IniFile.o
	ar r ${TARGET} NumericTime.o
	ar r ${TARGET} Start_End_Time.o
	ar r ${TARGET} NetworkUtil.o
	ar r ${TARGET} ShellConnect.o
	ar r ${TARGET} FileObj.o
	ar r ${TARGET} Work.o
	ar r ${TARGET} BitField.o
	ar r ${TARGET} Cycle.o	
	ar r ${TARGET} Socket.o
	ar r ${TARGET} Tokenizer.o
	ar r ${TARGET} LumpData.o
	ar r ${TARGET} Thread.o
	ar r ${TARGET} UniqNumGenerater.o
	ar r ${TARGET} Log.o
	ar r ${TARGET} StringObj.o
	ar r ${TARGET} BusyWaiter.o
	ar r ${TARGET} LogService.o
	ar r ${TARGET} TickSaver.o
	ar r ${TARGET} BaseDefine.o
	ar r ${TARGET} StaticProcessInfo.o
	ar s ${TARGET}
	ar t ${TARGET}

IniFile.o : IniFile.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp

Start_End_Time.o : Start_End_Time.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp

NumericObj.o : NumericObj.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp

NetworkUtil.o : NetworkUtil.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp

ShellConnect.o : ShellConnect.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp

FileObj.o : FileObj.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp
	
Work.o : Work.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp
	
BitField.o : BitField.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp

Tokenizer.o : Tokenizer.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp

LumpData.o : LumpData.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp
	
Cycle.o : Cycle.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp
	
UniqNumGenerater.o : UniqNumGenerater.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp
	
NumericTime.o : NumericTime.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp
	
Thread.o : Thread.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp
	
Socket.o : Socket.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp
	
Log.o : Log.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp
	
StringObj.o : StringObj.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp
	
BusyWaiter.o : BusyWaiter.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp
	
LogService.o : LogService.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp
	
TickSaver.o : TickSaver.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp

BaseDefine.o : BaseDefine.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp
	
StaticProcessInfo.o : StaticProcessInfo.cpp
	${CC} ${INCLUDE} ${CFLAG} ${PROFILE} ${OPTIMIZE} ${WARNNING} $*.cpp

clean :
	rm -rf *.o *.a

new:
	${MAKE} clean
	${MAKE}
